import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '@/views/Index'
import News from '@/views/News'
import Sport from '@/views/Sport'
import Tyindex from '@/views/Second.vue/Tyindex'
import Guowai from '@/views/Second.vue/Guowai'
import Guonei from '@/views/Second.vue/Guonei'

// 第二题组件
import UIrouter from '@/views/UIrouter'
import Contacts from '@/views/Contacts'
import About from '@/views/About'
import Alice from '@/views/Third.vue/Alice'
import Allcon from '@/views/Third.vue/Allcon'
import Bob from '@/views/Third.vue/Bob'
import Blog from '@/views/Four.vue/Blog'
import Fax from '@/views/Four.vue/Fax'


Vue.use(VueRouter)

const router = new VueRouter({
  routes: [
    {
      path: '/news',
      component:News
    },
    {
      path: '/index',
      component:Index
    },
    {
      path: '/sport',
      component: Sport,
      children: [
        {
          path: 'tyindex',
          component:Tyindex
        },
        {
          path: 'guonei',
          component:Guonei
        },
        {
          path: 'guowai',
          component:Guowai
        }
      ]
    },


    // 第二题
    {
      path: '/ulrouter',
      component:UIrouter
    },
    {
      path: '/about',
      component:About
    },
    {
      path: '/contacts',
      component: Contacts,
      children: [
        {
          path: 'allcon',
          component:Allcon
        },
        {
          path: 'alice',
          component:Alice
        },
        {
          path: 'bob',
          component: Bob,
          children: [
            {
              path: 'blog',
              component:Blog
            },
            {
              path: 'fax',
              component:Fax
            }
          ]
        }
      ]
    },
  ]
})
export default router